package com.vnp.vchat.bean;

import android.os.Parcel;
import android.os.Parcelable;

public class ObjMsgChat implements Parcelable{
	public static final String TYPE_TEXT = "text";
	public static final String TYPE_IMAGE = "image";
	public static final String TYPE_AUDIO = "audio";
	
	public static final int STATUS_SENDING = 0x0;
	public static final int STATUS_SUCCESS = 0x1;
	public static final int STATUS_ERROR = 0x2;
	
	String msgID;
	String tenKhachHang;
	String urlAvatarKhachhang;
	String type = "";
	String content ;
	
	String urlImageKH;
	String fromId;
	String id;
	String support_name;
	String support_image;
	String link="android_app";
	private String vgc_key;
	
	
	long time;
	int status = STATUS_SENDING; //0: dang gui, 1: thanh cong, 2: loi
	
	public ObjMsgChat(Parcel in){
		msgID = in.readString();
		tenKhachHang = in.readString();
		urlAvatarKhachhang = in.readString();
		type = in.readString();
		content = in.readString();
		urlImageKH = in.readString();
		fromId = in.readString();
		//id = in.readString();
		time = in.readInt();
		status = in.readInt();
		vgc_key = in.readString();
	}
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(msgID);
		dest.writeString(tenKhachHang);
		dest.writeString(urlAvatarKhachhang);
		dest.writeString(type);
		dest.writeString(content);
		dest.writeString(urlImageKH);
		dest.writeString(fromId);
		//dest.writeString(id);
		dest.writeLong(time);
		dest.writeInt(status);
		dest.writeString(vgc_key);
		
	}
	
	
	
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getMsgID() {
		return msgID;
	}


	public void setMsgID(String msgID) {
		this.msgID = msgID;
	}


	public long getTime() {
		return time;
	}


	public void setTime(long time) {
		this.time = time;
	}


	public String getUrlImageKH() {
		return urlImageKH;
	}


	public void setUrlImageKH(String urlImageKH) {
		this.urlImageKH = urlImageKH;
	}
	
	public ObjMsgChat(){
		
	}


	public ObjMsgChat(String fromId ,String urlAvatar, String content, String urlImageKh,
			String support_name,String support_image,String link){
		super();
		this.fromId = fromId;
		this.urlAvatarKhachhang = urlAvatar;
		this.content = content;
		this.urlImageKH = urlImageKh;
		this.link =link;
		this.support_image =support_image;
		this.support_name =support_name;
		//this.vgc_key=vgc_key;
	}
	
	
	public String getFromId() {
		return fromId;
	}
	public void setFromId(String fromId) {
		this.fromId = fromId;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getTenKhachHang() {
		return tenKhachHang;
	}
	public void setTenKhachHang(String tenKhachHang) {
		this.tenKhachHang = tenKhachHang;
	}
	public String getUrlAvatarKhachhang() {
		return urlAvatarKhachhang;
	}
	public void setUrlAvatarKhachhang(String urlAvatarKhachhang) {
		this.urlAvatarKhachhang = urlAvatarKhachhang;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}

	
	
	
	@Override
	public int describeContents() {
		return 0;
	}

//	public String getVgc_key() {
//		return vgc_key;
//	}
//
//	public void setVgc_key(String vgc_key) {
//		this.vgc_key = vgc_key;
//	}

	public static final Parcelable.Creator<ObjMsgChat> CREATOR = new Parcelable.Creator<ObjMsgChat>() {
		@Override
		public ObjMsgChat createFromParcel(Parcel in) {
			return new ObjMsgChat(in);
		}

		@Override
		public ObjMsgChat[] newArray(int size) {
			return new ObjMsgChat[size];
		}
	};
	
	

}
